package com.sicau.socialpracticesystem.common.myenum;

import com.sicau.socialpracticesystem.entity.po.College;

import java.util.ArrayList;
import java.util.List;

/**
 * 学院枚举
 *
 * @author sxt
 * @version : 1.0.0
 */
public enum OriginAddressEnum {

    ORIGIN_CHENG_DU(0, "四川农业大学成都校区"),
    ORIGIN_YA_AN(1, "四川农业大学雅安校区"),
    ORIGIN_DU_JIANG_YAN(2, "四川农业大学都江堰校区");

    OriginAddressEnum(Integer id, String address) {
        this.id = id;
        this.address = address;
    }

    /**
     * 地址类型
     */
    private final Integer id;

    /**
     * 地址描述
     */
    private final String address;


    public Integer getId() {
        return id;
    }


    public String getAddress() {
        return address;
    }

    public static OriginAddressEnum getEnum(Integer state) {
        OriginAddressEnum[] collegeEnums = values();
        for (OriginAddressEnum collegeEnum : collegeEnums) {
            if (collegeEnum.getId().equals(state)) {
                return collegeEnum;
            }
        }
        return null;
    }
}
